package com.cj.user.service.demo;

import lombok.Data;

/**
 * @Author cheng jun
 * @Description:
 * @Date 2021/7/23 15:13
 */
@Data
public class Demo12 extends Demo13 {

    private String name;

    public static void demo1() {
        /*List<Demo12> list = new ArrayList<>();
        list.add(new Demo12("aaa"));
        list.add(new Demo12("bbb"));
        list.add(new Demo12("aaa"));
        list.add(new Demo12("ccc"));
        list.add(new Demo12("bbb"));
        list.add(new Demo12("ddd"));

        for (int i = 0; i < list.size(); i++) {
            int count = 0;
            for (int i1 = 0; i1 < list.size(); i1++) {
                if (Objects.equals(list.get(i1).getName(), list.get(i).getName())) {
                    count++;
                    if (count > 1) {
                        list.remove(i1);
                    }
                }
            }
        }

        System.out.println(list);*/
    }

    public static void demo2() {
        /*Set<Demo12> set = new HashSet<>();
        set.add(new Demo12("aaa"));
        set.add(new Demo12("bbb"));
        set.add(new Demo12("aaa"));
        set.add(new Demo12("ccc"));
        set.add(new Demo12("bbb"));
        set.add(new Demo12("ddd"));

        System.out.println(set);*/
    }

    public static void demo3() {
        Demo12 demo12 = new Demo12();
        demo12.setName("aaa");
        System.out.println(demo12.getName());
        System.out.println(demo12.getAge());
    }

    public static void main(String[] args) {
        Demo12.demo3();
    }
}
